Mobile devices, such as notebook computers, may be powered by a battery. Software, such as an operating system (OS) running on the mobile device, may gauge an actual remaining battery capacity of the battery. Should the actual remaining battery capacity fall below a battery level threshold, the OS may enter an inactive state, such as a hibernate state. Before entering the hibernate state, the OS may carry out operations to preserve data, such as saving data of a volatile memory to a non-volatile memory of the mobile device.
The battery level threshold is set by the OS to ensure that the actual remaining battery capacity of the battery is sufficient to power a transition of the mobile device to the hibernate state.